import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { h } from 'vue';
import { Icon } from '/@/components/Icon';
import { render } from '/@/utils/common/renderUtils';

// 定义可选择的组件类型
export enum ComponentTypes {
  Default = 'layouts/default/index',
  IFrame = 'sys/iframe/FrameBlank',
}

export const columns: BasicColumn[] = [
  {
    title: '分组名称',
    dataIndex: 'name',
    width: 200,
    align: 'left',
  },
  {
    title: '系统访问地址',
    dataIndex: 'url',
    width: 200,
    align: 'left',
  },
  {
    title: '描述',
    dataIndex: 'description',
    align: 'left',
    width: 150,
  },
  {
    title: '创建时间',
    dataIndex: 'createTime',
    align: 'left',
    width: 150,
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'name',
    label: '分组名称',
    component: 'Input',
    colProps: { span: 8 },
  },
];

export const formSchema: FormSchema[] = [
  {
    label: 'id',
    field: 'id',
    component: 'Input',
    show: false,
  },
  {
    field: 'name',
    label: '分组名称',
    component: 'Input',
    required: true,
  },
  {
    field: 'url',
    label: '系统访问地址',
    component: 'Input',
  },
  {
    field: 'description',
    label: '描述',
    component: 'InputTextArea',
  },
];
